﻿using Equinoxe.EZNFC.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Equinoxe.EZNFC.UnitTests
{
    [TestClass]
    public class OtherTests
    {
        [TestMethod]
        public void IntToByteArrayTest()
        {
            var value = 100;

            var array = new byte[]{0x64,0,0,0};

            var bytearray = Tools.IntToByteArray(value);

            for (var i = 0; i < 4; i++)
            {
                Assert.AreEqual(bytearray[i], bytearray[i]);
            }

            var value2 = Tools.ByteArrayToInt(bytearray);

            Assert.AreEqual(value,value2);

        }
    }
}
